package com.wu.service.sys;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wu.base.ApiResponse;
import com.wu.entity.sys.SUserDo;
import com.wu.pojo.dto.SessionUserDto;
import com.wu.pojo.reqeust.CommonIdRequest;
import com.wu.pojo.reqeust.CommonIdStatusRequest;
import com.wu.pojo.reqeust.sys.*;
import com.wu.pojo.response.sys.UserOptionListResponse;

import java.util.List;


/**
 * 用户表(SUser)表服务接口
 *
 * @since 2020-12-29 13:20:30
 */
public interface SUserService extends IService<SUserDo> {

    ApiResponse login(LoginRequest loginRequest);

    ApiResponse phoneLogin(PhoneLoginRequest request);

    SessionUserDto getUserDoByUsername(String userName);

    ApiResponse list(UserListRequest request);

    ApiResponse optionList(UserListRequest request);

    ApiResponse save(UserSaveRequest request);

    ApiResponse edit(UserEditRequest request);

    ApiResponse delete(CommonIdRequest request);

    ApiResponse onOrOff(CommonIdStatusRequest request);

    ApiResponse getById(CommonIdRequest request);

    ApiResponse defaultPwd(CommonIdRequest request);

    ApiResponse editPwd(EditPasswordRequest request);

    List<UserOptionListResponse> getUsersByIds(List<Long> ids);

    /**
     * 此部门及以下部门的人员
     * @param id
     * @return
     */
    List<UserOptionListResponse> getUsersByDepartmentId(Long id);
}